import request from '@/utils/request';
import { getCookie } from "@/utils/authority";

export async function queryRule(params) {
  return request('/api/userList', {
    params,
    headers: {
      'login-token': getCookie('tks')
    },
  });
}
export async function removeRule(params) {
  return request('/api/', {
    method: 'POST',
    headers: {
      'login-token': getCookie('tks')
    },
    data: { ...params},
  });
}

export async function updateUser(params) {
  return request('/api/updateUser', {
    method: 'POST',
    headers: {
      'login-token': getCookie('tks')
    },
    data: { ...params},
  });
}

export async function getRoleList() {
  return request('/api/roleList', {
    method: 'POST',
    headers: {
      'login-token': getCookie('tks')
    }
  });
}
export async function sysncu() {
  return request('/api/sysncUser', {
    method: 'POST',
    headers: {
      'login-token': getCookie('tks')
    }
  });
}
